package com.fr.data.core.db.dml;

import com.fr.base.core.list.IntList;
import com.fr.data.core.db.dialect.Dialect;
import java.util.ArrayList;
import java.util.List;

public abstract class InsertOrUpdate extends AbstractDML
{
  private List columnNameList = new ArrayList();
  private IntList columnTypeList = new IntList();
  private List columnValueList = new ArrayList();

  protected InsertOrUpdate(Table paramTable, Dialect paramDialect)
  {
    super(paramTable, paramDialect);
  }

  public abstract boolean isUpdate();

  public void addColumn(String paramString, int paramInt, Object paramObject)
  {
    if (paramString == null)
      return;
    this.columnNameList.add(paramString);
    this.columnTypeList.add(paramInt);
    this.columnValueList.add(paramObject);
  }

  public int getColumnCount()
  {
    return this.columnNameList.size();
  }

  public String getColumnName(int paramInt)
  {
    return ((String)this.columnNameList.get(paramInt));
  }

  public int getColumnType(int paramInt)
  {
    return this.columnTypeList.get(paramInt);
  }

  public Object getColumnValue(int paramInt)
  {
    return this.columnValueList.get(paramInt);
  }

  public void clearAllColumn()
  {
    this.columnNameList.clear();
    this.columnTypeList.clear();
    this.columnValueList.clear();
  }
}